.class public Lcom/baidu/crabsdk/CrabSDK;
.super Ljava/lang/Object;


# static fields
.field public static CURRENT_PID:I = 0x0

.field public static CURRENT_PNAME:Ljava/lang/String; = ""

.field public static FILE_PATH:Ljava/lang/String; = "/sdcard"

.field public static NDK_VERSION:Ljava/lang/String; = "-1"

.field private static R:Landroid/app/Application;

.field private static S:Z


# direct methods
.method static constructor <clinit>()V
    .locals 0

    return-void
.end method

.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static behaviorRecordEvent(Landroid/view/MotionEvent;Landroid/app/Activity;)V
    .locals 0

    invoke-static {p0, p1}, Lcom/baidu/crabsdk/b/d;->dispatchTouchEvent(Landroid/view/MotionEvent;Landroid/app/Activity;)V

    return-void
.end method

.method public static callAfterNativeMethod()V
    .locals 1

    :try_start_0
    invoke-static {}, Lcom/baidu/crabsdk/sender/NativeCrashHandler;->ad()Lcom/baidu/crabsdk/sender/NativeCrashHandler;

    move-result-object v0

    invoke-virtual {v0}, Lcom/baidu/crabsdk/sender/NativeCrashHandler;->af()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    return-void

    :catch_0
    const-string v0, "callAfterNativeMethod error!"

    invoke-static {v0}, Lcom/baidu/crabsdk/c/a;->v(Ljava/lang/String;)I

    return-void
.end method

.method public static callBeforeNativeMethod()V
    .locals 10

    const-string v0, "N/A"

    :try_start_0
    sget-object v1, Lcom/baidu/crabsdk/CrabSDK;->R:Landroid/app/Application;

    invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Thread;->getStackTrace()[Ljava/lang/StackTraceElement;

    move-result-object v2

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const/4 v4, 0x4

    if-eqz v2, :cond_1

    array-length v5, v2

    if-lez v5, :cond_1

    const/4 v5, 0x0

    :goto_0
    array-length v6, v2

    if-ge v5, v6, :cond_1

    if-lt v5, v4, :cond_0

    aget-object v6, v2, v5

    invoke-virtual {v3, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    const-string v6, "\n"

    invoke-virtual {v3, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    :cond_0
    add-int/lit8 v5, v5, 0x1

    goto :goto_0

    :cond_1
    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "java\u5806\u6808\u4fe1\u606f\u662f\uff1a\n"

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {v5}, Lcom/baidu/crabsdk/c/a;->t(Ljava/lang/String;)I

    new-instance v5, Lorg/json/JSONObject;

    invoke-direct {v5}, Lorg/json/JSONObject;-><init>()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_3

    :try_start_1
    invoke-static {}, Lcom/baidu/crabsdk/b/q;->K()Ljava/lang/String;

    move-result-object v6
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_1

    :catch_0
    move-exception v6

    :try_start_2
    const-string v7, "StorageCollector in callBeforeNativeMethod Error!!"

    invoke-static {v7, v6}, Lcom/baidu/crabsdk/c/a;->a(Ljava/lang/String;Ljava/lang/Throwable;)I
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_3

    move-object v6, v0

    :goto_1
    :try_start_3
    const-string v7, "phoneTime"

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v8

    invoke-virtual {v5, v7, v8, v9}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;

    invoke-static {}, Lcom/baidu/crabsdk/b/l;->A()Ljava/lang/String;

    move-result-object v7

    const-string v8, "memInfo"

    invoke-virtual {v5, v8, v7}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    invoke-static {}, Lcom/baidu/crabsdk/b/n;->D()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v7

    const-string v8, "networkInfo"

    invoke-virtual {v5, v8, v7}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v7, "uname"

    invoke-static {}, Lcom/baidu/crabsdk/b/s;->getUserName()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v5, v7, v8}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v7, "uid"

    invoke-static {}, Lcom/baidu/crabsdk/b/s;->M()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v5, v7, v8}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v7, "internalStorageInfo"

    invoke-virtual {v5, v7, v6}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v6, "usersCustom"

    invoke-static {}, Lcom/baidu/crabsdk/b/s;->O()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v5, v6, v7}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v6, "batteryRate"

    invoke-static {}, Lcom/baidu/crabsdk/b/g;->v()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v5, v6, v7}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_3
    .catch Lorg/json/JSONException; {:try_start_3 .. :try_end_3} :catch_1
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_3

    const-string v6, "javaLine"

    if-nez v2, :cond_2

    :goto_2
    :try_start_4
    invoke-virtual {v5, v6, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    goto :goto_3

    :cond_2
    array-length v0, v2

    if-ge v0, v4, :cond_3

    array-length v0, v2

    add-int/lit8 v0, v0, -0x1

    aget-object v0, v2, v0

    goto :goto_2

    :cond_3
    aget-object v0, v2, v4

    goto :goto_2

    :goto_3
    const-string v0, "errorTrace"

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v5, v0, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    invoke-static {v1}, Lcom/baidu/crabsdk/b/h;->g(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v0

    const-string v1, "CUID"

    invoke-virtual {v5, v1, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v0, "channel"

    sget-object v1, Lcom/baidu/crabsdk/a;->b:Ljava/lang/String;

    invoke-virtual {v5, v0, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v0, "myAppCPUStat"

    invoke-static {}, Lcom/baidu/crabsdk/b/e;->u()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v5, v0, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v0, "curPage"

    invoke-static {}, Lcom/baidu/crabsdk/b/a;->q()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v5, v0, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v0, "startupTime"

    invoke-static {}, Lcom/baidu/crabsdk/b/a;->o()J

    move-result-wide v1

    invoke-virtual {v5, v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;

    const-string v0, "pageHistory"

    invoke-static {}, Lcom/baidu/crabsdk/b/a;->p()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v5, v0, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v0, "logcat"

    const-string v1, ""

    invoke-virtual {v5, v0, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v0, "sysMemInfo"

    invoke-static {}, Lcom/baidu/crabsdk/b/l;->z()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v5, v0, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v0, "allThreadStacks"

    invoke-static {}, Lcom/baidu/crabsdk/b/r;->L()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v5, v0, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_4
    .catch Lorg/json/JSONException; {:try_start_4 .. :try_end_4} :catch_1
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_3

    goto :goto_4

    :catch_1
    move-exception v0

    :try_start_5
    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    const-string v1, "callBeforeNativeMethod JSON Format Error!!"

    invoke-static {v1, v0}, Lcom/baidu/crabsdk/c/a;->a(Ljava/lang/String;Ljava/lang/Throwable;)I
    :try_end_5
    .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_3

    :goto_4
    :try_start_6
    invoke-virtual {v5}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/baidu/crabsdk/c/d;->z(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-static {}, Lcom/baidu/crabsdk/sender/NativeCrashHandler;->ad()Lcom/baidu/crabsdk/sender/NativeCrashHandler;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/baidu/crabsdk/sender/NativeCrashHandler;->r(Ljava/lang/String;)V
    :try_end_6
    .catch Ljava/lang/Exception; {:try_start_6 .. :try_end_6} :catch_2

    return-void

    :catch_2
    move-exception v0

    :try_start_7
    const-string v1, "call native method nRequiredVarParams error!!"

    invoke-static {v1, v0}, Lcom/baidu/crabsdk/c/a;->a(Ljava/lang/String;Ljava/lang/Throwable;)I
    :try_end_7
    .catch Ljava/lang/Exception; {:try_start_7 .. :try_end_7} :catch_3

    return-void

    :catch_3
    move-exception v0

    const-string v1, "callBeforeNativeMethod error!"

    invoke-static {v1, v0}, Lcom/baidu/crabsdk/c/a;->a(Ljava/lang/String;Ljava/lang/Throwable;)I

    return-void
.end method

.method public static closeAnrHandler()V
    .locals 1

    const/4 v0, 0x0

    sput-boolean v0, Lcom/baidu/crabsdk/a;->I:Z

    return-void
.end method

.method public static disableBlockCatch()V
    .locals 1

    invoke-static {}, Lcom/baidu/crabsdk/a/b;->i()Lcom/baidu/crabsdk/a/b;

    move-result-object v0

    if-eqz v0, :cond_0

    invoke-static {}, Lcom/baidu/crabsdk/a/b;->i()Lcom/baidu/crabsdk/a/b;

    move-result-object v0

    invoke-virtual {v0}, Lcom/baidu/crabsdk/a/b;->stop()V

    sget-object v0, Lcom/baidu/crabsdk/CrabSDK;->R:Landroid/app/Application;

    invoke-static {v0}, Lcom/baidu/crabsdk/a/c;->c(Landroid/content/Context;)Lcom/baidu/crabsdk/a/c;

    invoke-static {}, Lcom/baidu/crabsdk/a/c;->stop()V

    return-void

    :cond_0
    const-string v0, "Block Monitor has never been enabled!"

    invoke-static {v0}, Lcom/baidu/crabsdk/c/a;->v(Ljava/lang/String;)I

    return-void
.end method

.method public static dispatchTouchEvent(Landroid/view/MotionEvent;Landroid/app/Activity;)V
    .locals 0
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    invoke-static {p0, p1}, Lcom/baidu/crabsdk/b/d;->dispatchTouchEvent(Landroid/view/MotionEvent;Landroid/app/Activity;)V

    return-void
.end method

.method public static doActivityStart(Landroid/app/Activity;)V
    .locals 0

    invoke-static {p0}, Lcom/baidu/crabsdk/b/a;->doActivityStart(Landroid/app/Activity;)V

    return-void
.end method

.method public static doActivityStop(Landroid/app/Activity;)V
    .locals 0

    invoke-static {p0}, Lcom/baidu/crabsdk/b/a;->doActivityStop(Landroid/app/Activity;)V

    return-void
.end method

.method public static enableBlockCatch(I)V
    .locals 2

    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0x10

    if-lt v0, v1, :cond_0

    invoke-static {p0}, Lcom/baidu/crabsdk/CrabSDK;->setUploadLimitOfBlockInOneday(I)V

    invoke-static {}, Lcom/baidu/crabsdk/sender/f;->Z()Z

    move-result p0

    if-eqz p0, :cond_1

    sget-object p0, Lcom/baidu/crabsdk/CrabSDK;->R:Landroid/app/Application;

    invoke-static {p0}, Lcom/baidu/crabsdk/a/b;->a(Landroid/content/Context;)Lcom/baidu/crabsdk/a/b;

    move-result-object p0

    invoke-virtual {p0}, Lcom/baidu/crabsdk/a/b;->start()V

    sget-object p0, Lcom/baidu/crabsdk/CrabSDK;->R:Landroid/app/Application;

    invoke-static {p0}, Lcom/baidu/crabsdk/a/c;->c(Landroid/content/Context;)Lcom/baidu/crabsdk/a/c;

    invoke-static {}, Lcom/baidu/crabsdk/a/c;->start()V

    return-void

    :cond_0
    const-string p0, "ERROR! BlockCatch only can be enabled when SDK_INT >= 16"

    invoke-static {p0}, Lcom/baidu/crabsdk/c/a;->v(Ljava/lang/String;)I

    :cond_1
    return-void
.end method

.method public static enableBlockCatch(IZ)V
    .locals 0

    sput-boolean p1, Lcom/baidu/crabsdk/a;->s:Z

    invoke-static {p0}, Lcom/baidu/crabsdk/CrabSDK;->enableBlockCatch(I)V

    return-void
.end method

.method public static getUsersCustomKV()Ljava/util/HashMap;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/HashMap<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    invoke-static {}, Lcom/baidu/crabsdk/b/s;->N()Ljava/util/HashMap;

    move-result-object v0

    return-object v0
.end method

.method public static init(Landroid/app/Application;Ljava/lang/String;)V
    .locals 4

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "crab init begin: "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2, v0, v1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Lcom/baidu/crabsdk/c/a;->v(Ljava/lang/String;)I

    sput-object p1, Lcom/baidu/crabsdk/a;->d:Ljava/lang/String;

    if-nez p0, :cond_0

    const-string p0, "crab init error caused by applcation null value"

    :goto_0
    invoke-static {p0}, Lcom/baidu/crabsdk/c/a;->v(Ljava/lang/String;)I

    return-void

    :cond_0
    sput-object p0, Lcom/baidu/crabsdk/CrabSDK;->R:Landroid/app/Application;

    invoke-virtual {p0}, Landroid/app/Application;->getFilesDir()Ljava/io/File;

    move-result-object p0

    invoke-virtual {p0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object p0

    sput-object p0, Lcom/baidu/crabsdk/CrabSDK;->FILE_PATH:Ljava/lang/String;

    new-instance p0, Ljava/lang/StringBuilder;

    const-string v2, "FILE_PATH IS : "

    invoke-direct {p0, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v2, Lcom/baidu/crabsdk/CrabSDK;->FILE_PATH:Ljava/lang/String;

    invoke-virtual {p0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    invoke-static {p0}, Lcom/baidu/crabsdk/c/a;->u(Ljava/lang/String;)I

    sget-object p0, Lcom/baidu/crabsdk/CrabSDK;->R:Landroid/app/Application;

    invoke-static {p0, p1}, Lcom/baidu/crabsdk/CrabSDK;->initData(Landroid/app/Application;Ljava/lang/String;)V

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide p0

    const/4 v2, 0x0

    sput-boolean v2, Lcom/baidu/crabsdk/a;->J:Z

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "crab init end: "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2, p0, p1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const-string v3, ", cost: "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    sub-long/2addr p0, v0

    invoke-virtual {v2, p0, p1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const-string p0, "ms"

    invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    goto :goto_0
.end method

.method public static initAnrCollector(Landroid/app/Application;Ljava/lang/String;)V
    .locals 0

    sput-object p1, Lcom/baidu/crabsdk/a;->d:Ljava/lang/String;

    invoke-static {p0}, Lcom/baidu/crabsdk/CrabSDK;->initCollector(Landroid/app/Application;)V

    invoke-static {p0}, Lcom/baidu/crabsdk/CrabSDK;->initCrashSwitch(Landroid/app/Application;)V

    sget-boolean p1, Lcom/baidu/crabsdk/a;->D:Z

    if-nez p1, :cond_0

    sget-boolean p1, Lcom/baidu/crabsdk/a;->I:Z

    if-eqz p1, :cond_0

    invoke-static {p0}, Lcom/baidu/crabsdk/b/c;->d(Landroid/content/Context;)V

    :cond_0
    invoke-static {p0}, Lcom/baidu/crabsdk/CrabSDK;->uploadRecord(Landroid/app/Application;)V

    return-void
.end method

.method public static initCollector(Landroid/app/Application;)V
    .locals 0

    invoke-static {p0}, Lcom/baidu/crabsdk/b/m;->d(Landroid/content/Context;)V

    invoke-static {p0}, Lcom/baidu/crabsdk/b/o;->d(Landroid/content/Context;)V

    invoke-static {p0}, Lcom/baidu/crabsdk/b/g;->d(Landroid/content/Context;)V

    invoke-static {}, Lcom/baidu/crabsdk/b/i;->w()V

    invoke-static {p0}, Lcom/baidu/crabsdk/b/l;->d(Landroid/content/Context;)V

    invoke-static {p0}, Lcom/baidu/crabsdk/b/s;->d(Landroid/content/Context;)V

    invoke-static {p0}, Lcom/baidu/crabsdk/b/n;->d(Landroid/content/Context;)V

    invoke-static {p0}, Lcom/baidu/crabsdk/b/a;->a(Landroid/app/Application;)V

    return-void
.end method

.method private static initCrashSwitch(Landroid/app/Application;)V
    .locals 0

    invoke-static {p0}, Lcom/baidu/crabsdk/sender/f;->d(Landroid/content/Context;)V

    return-void
.end method

.method private static initData(Landroid/app/Application;Ljava/lang/String;)V
    .locals 6

    invoke-static {}, Landroid/os/Process;->myPid()I

    move-result v0

    sput v0, Lcom/baidu/crabsdk/CrabSDK;->CURRENT_PID:I

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "CrabSDK.init from "

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v2, Lcom/baidu/crabsdk/CrabSDK;->R:Landroid/app/Application;

    invoke-virtual {v2}, Landroid/app/Application;->getPackageName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v2, " with pid "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lcom/baidu/crabsdk/c/a;->s(Ljava/lang/String;)I

    const-string v1, "activity"

    invoke-virtual {p0, v1}, Landroid/app/Application;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/app/ActivityManager;

    invoke-virtual {v1}, Landroid/app/ActivityManager;->getRunningAppProcesses()Ljava/util/List;

    move-result-object v1

    if-eqz v1, :cond_5

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v2

    if-nez v2, :cond_0

    goto :goto_2

    :cond_0
    invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :cond_1
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    const/4 v3, 0x1

    const/4 v4, 0x0

    if-eqz v2, :cond_3

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/app/ActivityManager$RunningAppProcessInfo;

    iget v5, v2, Landroid/app/ActivityManager$RunningAppProcessInfo;->pid:I

    if-ne v5, v0, :cond_1

    iget-object v0, v2, Landroid/app/ActivityManager$RunningAppProcessInfo;->processName:Ljava/lang/String;

    invoke-virtual {p0}, Landroid/app/Application;->getPackageName()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    const-string v1, "."

    if-eqz v0, :cond_2

    sput-boolean v3, Lcom/baidu/crabsdk/CrabSDK;->S:Z

    new-instance v0, Ljava/lang/StringBuilder;

    const-string v4, "Main process "

    invoke-direct {v0, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    goto :goto_0

    :cond_2
    sput-boolean v4, Lcom/baidu/crabsdk/CrabSDK;->S:Z

    new-instance v0, Ljava/lang/StringBuilder;

    const-string v4, "Sub process "

    invoke-direct {v0, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    :goto_0
    iget-object v4, v2, Landroid/app/ActivityManager$RunningAppProcessInfo;->processName:Ljava/lang/String;

    invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/baidu/crabsdk/c/a;->s(Ljava/lang/String;)I

    iget-object v0, v2, Landroid/app/ActivityManager$RunningAppProcessInfo;->processName:Ljava/lang/String;

    sput-object v0, Lcom/baidu/crabsdk/CrabSDK;->CURRENT_PNAME:Ljava/lang/String;

    goto :goto_1

    :cond_3
    const/4 v3, 0x0

    :goto_1
    if-nez v3, :cond_4

    return-void

    :cond_4
    invoke-static {p0}, Lcom/baidu/crabsdk/CrabSDK;->initCrashSwitch(Landroid/app/Application;)V

    invoke-static {p0}, Lcom/baidu/crabsdk/CrabSDK;->initCollector(Landroid/app/Application;)V

    invoke-static {}, Lcom/baidu/crabsdk/sender/d;->S()Lcom/baidu/crabsdk/sender/d;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/baidu/crabsdk/sender/d;->d(Landroid/content/Context;)V

    invoke-static {p0, p1}, Lcom/baidu/crabsdk/CrabSDK;->initAnrCollector(Landroid/app/Application;Ljava/lang/String;)V

    return-void

    :cond_5
    :goto_2
    const-string p0, "getRunningAppProcesses error!!"

    invoke-static {p0}, Lcom/baidu/crabsdk/c/a;->s(Ljava/lang/String;)I

    return-void
.end method

.method private static initNativeHandler()V
    .locals 1

    sget-object v0, Lcom/baidu/crabsdk/CrabSDK;->R:Landroid/app/Application;

    invoke-static {v0}, Lcom/baidu/crabsdk/sender/NativeCrashHandler;->s(Landroid/content/Context;)Lcom/baidu/crabsdk/sender/NativeCrashHandler;

    move-result-object v0

    invoke-virtual {v0}, Lcom/baidu/crabsdk/sender/NativeCrashHandler;->ae()V

    sget-object v0, Lcom/baidu/crabsdk/CrabSDK;->R:Landroid/app/Application;

    invoke-static {v0}, Lcom/baidu/crabsdk/sender/i;->k(Landroid/content/Context;)V

    return-void
.end method

.method public static onPause(Landroid/content/Context;)V
    .locals 0
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    return-void
.end method

.method public static onResume(Landroid/content/Context;)V
    .locals 0
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    return-void
.end method

.method public static openNativeCrashHandler()V
    .locals 1

    const/4 v0, 0x0

    sput-boolean v0, Lcom/baidu/crabsdk/a;->L:Z

    invoke-static {}, Lcom/baidu/crabsdk/CrabSDK;->initNativeHandler()V

    return-void
.end method

.method public static openNativeCrashHandlerWithSysCatched()V
    .locals 1

    const/4 v0, 0x1

    sput-boolean v0, Lcom/baidu/crabsdk/a;->L:Z

    invoke-static {}, Lcom/baidu/crabsdk/CrabSDK;->initNativeHandler()V

    return-void
.end method

.method public static pauseAnrWatchThread()V
    .locals 0

    invoke-static {}, Lcom/baidu/crabsdk/CrabSDK;->closeAnrHandler()V

    return-void
.end method

.method public static resumeAnrWatchThread()V
    .locals 2

    :try_start_0
    invoke-static {}, Lcom/baidu/crabsdk/b/c;->s()Ljava/lang/Thread;

    move-result-object v0

    if-eqz v0, :cond_1

    sget-boolean v1, Lcom/baidu/crabsdk/a;->I:Z

    if-nez v1, :cond_0

    const/4 v1, 0x1

    sput-boolean v1, Lcom/baidu/crabsdk/a;->I:Z

    new-instance v1, Ljava/lang/Thread;

    invoke-direct {v1, v0}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    invoke-virtual {v1}, Ljava/lang/Thread;->start()V

    return-void

    :cond_0
    const-string v0, "ANR watch thread is running"

    invoke-static {v0}, Lcom/baidu/crabsdk/c/a;->w(Ljava/lang/String;)I

    return-void

    :cond_1
    sget-object v0, Lcom/baidu/crabsdk/CrabSDK;->R:Landroid/app/Application;

    sget-object v1, Lcom/baidu/crabsdk/a;->d:Ljava/lang/String;

    invoke-static {v0, v1}, Lcom/baidu/crabsdk/CrabSDK;->initAnrCollector(Landroid/app/Application;Ljava/lang/String;)V

    const-string v0, "ANR watch thread is null, init anrCollector again"

    invoke-static {v0}, Lcom/baidu/crabsdk/c/a;->u(Ljava/lang/String;)I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    return-void

    :catch_0
    move-exception v0

    const-string v1, "resumeAnrWatchThread->Exception"

    invoke-static {v1, v0}, Lcom/baidu/crabsdk/c/a;->a(Ljava/lang/String;Ljava/lang/Throwable;)I

    return-void
.end method

.method public static setAppVersionName(Ljava/lang/String;)V
    .locals 0

    sput-object p0, Lcom/baidu/crabsdk/a;->o:Ljava/lang/String;

    return-void
.end method

.method public static setBehaviorRecordLimit(I)V
    .locals 0

    sput p0, Lcom/baidu/crabsdk/a;->f:I

    return-void
.end method

.method public static setBlockThreshold(I)V
    .locals 1

    const/16 v0, 0x3e8

    if-ge p0, v0, :cond_0

    const-string p0, "You Are Strongly Recommended To Set Threshold Not Less Than 1000ms!!"

    invoke-static {p0}, Lcom/baidu/crabsdk/c/a;->v(Ljava/lang/String;)I

    sput v0, Lcom/baidu/crabsdk/a/a;->U:I

    return-void

    :cond_0
    sput p0, Lcom/baidu/crabsdk/a/a;->U:I

    return-void
.end method

.method public static setChannel(Ljava/lang/String;)V
    .locals 1

    if-eqz p0, :cond_1

    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v0

    if-nez v0, :cond_0

    goto :goto_0

    :cond_0
    sput-object p0, Lcom/baidu/crabsdk/a;->b:Ljava/lang/String;

    return-void

    :cond_1
    :goto_0
    const-string p0, "alpha"

    sput-object p0, Lcom/baidu/crabsdk/a;->b:Ljava/lang/String;

    return-void
.end method

.method public static setCollectScreenshot(Z)V
    .locals 0

    sput-boolean p0, Lcom/baidu/crabsdk/a;->m:Z

    return-void
.end method

.method public static setConstantSameCrashExceedLimit(I)V
    .locals 0

    sput p0, Lcom/baidu/crabsdk/a;->z:I

    return-void
.end method

.method public static setDebugAnrExpUrl(Ljava/lang/String;)V
    .locals 0

    sput-object p0, Lcom/baidu/crabsdk/a;->Q:Ljava/lang/String;

    return-void
.end method

.method public static setDebugCrashUrl(Ljava/lang/String;)V
    .locals 0

    sput-object p0, Lcom/baidu/crabsdk/a;->P:Ljava/lang/String;

    return-void
.end method

.method public static setDebugMode(Z)V
    .locals 0

    sput-boolean p0, Lcom/baidu/crabsdk/a;->n:Z

    return-void
.end method

.method public static setDeveloperName(Ljava/lang/String;)V
    .locals 0

    sput-object p0, Lcom/baidu/crabsdk/a;->a:Ljava/lang/String;

    return-void
.end method

.method public static setEnableLog(Z)V
    .locals 0

    sput-boolean p0, Lcom/baidu/crabsdk/a;->F:Z

    return-void
.end method

.method public static setImeiCatched(Z)V
    .locals 0

    sput-boolean p0, Lcom/baidu/crabsdk/a;->K:Z

    return-void
.end method

.method public static setIsOnline(Z)V
    .locals 0

    sput-boolean p0, Lcom/baidu/crabsdk/a;->E:Z

    return-void
.end method

.method public static setLogcatLineCount(I)V
    .locals 1

    const/16 v0, 0x3e8

    if-le p0, v0, :cond_0

    const-string p0, "\u5f3a\u70c8\u5efa\u8baelogcat\u6700\u5927\u884c\u6570\u5c0f\u4e8e1000\uff01"

    invoke-static {p0}, Lcom/baidu/crabsdk/c/a;->w(Ljava/lang/String;)I

    sput v0, Lcom/baidu/crabsdk/a;->h:I

    goto :goto_0

    :cond_0
    sput p0, Lcom/baidu/crabsdk/a;->h:I

    :goto_0
    invoke-static {}, Lcom/baidu/crabsdk/sender/NativeCrashHandler;->ad()Lcom/baidu/crabsdk/sender/NativeCrashHandler;

    move-result-object p0

    if-eqz p0, :cond_1

    invoke-static {}, Lcom/baidu/crabsdk/sender/NativeCrashHandler;->ad()Lcom/baidu/crabsdk/sender/NativeCrashHandler;

    move-result-object p0

    sget v0, Lcom/baidu/crabsdk/a;->h:I

    invoke-virtual {p0, v0}, Lcom/baidu/crabsdk/sender/NativeCrashHandler;->b(I)V

    :cond_1
    return-void
.end method

.method public static setOnAnrCrashListener(Lcom/baidu/crabsdk/OnAnrCrashListener;)V
    .locals 0

    sput-object p0, Lcom/baidu/crabsdk/a;->N:Lcom/baidu/crabsdk/OnAnrCrashListener;

    return-void
.end method

.method public static setOnCrashExceedListener(Lcom/baidu/crabsdk/OnCrashExceedListener;)V
    .locals 0

    sput-object p0, Lcom/baidu/crabsdk/a;->O:Lcom/baidu/crabsdk/OnCrashExceedListener;

    return-void
.end method

.method public static setSendPrivacyInformation(Z)V
    .locals 0

    sput-boolean p0, Lcom/baidu/crabsdk/a;->q:Z

    return-void
.end method

.method public static setUid(Ljava/lang/String;)V
    .locals 0

    invoke-static {p0}, Lcom/baidu/crabsdk/b/s;->c(Ljava/lang/String;)V

    return-void
.end method

.method public static setUploadCrashOnlyWifi(Z)V
    .locals 0

    sput-boolean p0, Lcom/baidu/crabsdk/a;->r:Z

    return-void
.end method

.method public static setUploadImmediately(Z)V
    .locals 0

    sput-boolean p0, Lcom/baidu/crabsdk/a;->p:Z

    return-void
.end method

.method public static setUploadLimitOfAnrInOneday(I)V
    .locals 0

    sput p0, Lcom/baidu/crabsdk/a;->v:I

    return-void
.end method

.method private static setUploadLimitOfBlockInOneday(I)V
    .locals 0

    sput p0, Lcom/baidu/crabsdk/a;->w:I

    return-void
.end method

.method public static setUploadLimitOfCrashInOneday(I)V
    .locals 0

    sput p0, Lcom/baidu/crabsdk/a;->u:I

    return-void
.end method

.method public static setUploadLimitOfSameCrashInOneday(I)V
    .locals 0

    sput p0, Lcom/baidu/crabsdk/a;->t:I

    return-void
.end method

.method public static setUrlRecordLimit(I)V
    .locals 0

    sput p0, Lcom/baidu/crabsdk/a;->g:I

    return-void
.end method

.method public static setUserName(Ljava/lang/String;)V
    .locals 0

    invoke-static {p0}, Lcom/baidu/crabsdk/b/s;->setUserName(Ljava/lang/String;)V

    return-void
.end method

.method public static setUsersCustomKV(Ljava/lang/String;Ljava/lang/String;)V
    .locals 1

    invoke-static {}, Lcom/baidu/crabsdk/b/s;->N()Ljava/util/HashMap;

    move-result-object v0

    invoke-virtual {v0, p0, p1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    invoke-static {v0}, Lcom/baidu/crabsdk/CrabSDK;->setUsersCustomKV(Ljava/util/HashMap;)V

    return-void
.end method

.method public static setUsersCustomKV(Ljava/util/HashMap;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/HashMap<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;)V"
        }
    .end annotation

    invoke-static {p0}, Lcom/baidu/crabsdk/b/s;->a(Ljava/util/HashMap;)V

    return-void
.end method

.method public static uploadApplife(Z)V
    .locals 0

    sput-boolean p0, Lcom/baidu/crabsdk/a;->M:Z

    invoke-static {}, Lcom/baidu/crabsdk/b/m;->B()V

    sget-object p0, Lcom/baidu/crabsdk/CrabSDK;->R:Landroid/app/Application;

    invoke-static {p0}, Lcom/baidu/crabsdk/sender/i;->n(Landroid/content/Context;)V

    return-void
.end method

.method public static uploadCrash(Ljava/lang/Throwable;)V
    .locals 1

    sget-object v0, Lcom/baidu/crabsdk/CrabSDK;->R:Landroid/app/Application;

    if-eqz v0, :cond_1

    if-nez p0, :cond_0

    goto :goto_0

    :cond_0
    invoke-static {v0, p0}, Lcom/baidu/crabsdk/sender/i;->b(Landroid/content/Context;Ljava/lang/Throwable;)V

    :cond_1
    :goto_0
    return-void
.end method

.method public static uploadException(Ljava/lang/Throwable;)V
    .locals 1

    if-eqz p0, :cond_1

    sget-object v0, Lcom/baidu/crabsdk/CrabSDK;->R:Landroid/app/Application;

    if-nez v0, :cond_0

    goto :goto_0

    :cond_0
    invoke-static {v0, p0}, Lcom/baidu/crabsdk/sender/i;->a(Landroid/content/Context;Ljava/lang/Throwable;)V

    :cond_1
    :goto_0
    return-void
.end method

.method private static uploadRecord(Landroid/app/Application;)V
    .locals 1

    invoke-static {}, Lcom/baidu/crabsdk/sender/f;->U()Z

    move-result v0

    if-eqz v0, :cond_0

    sget-boolean v0, Lcom/baidu/crabsdk/a;->D:Z

    if-nez v0, :cond_0

    const/4 v0, 0x1

    invoke-static {v0, p0}, Lcom/baidu/crabsdk/sender/i;->a(ZLandroid/content/Context;)V

    :cond_0
    return-void
.end method

.method public static urlRecordEvent(Landroid/view/MotionEvent;Landroid/app/Activity;)V
    .locals 0

    invoke-static {p0, p1}, Lcom/baidu/crabsdk/b/t;->urlRecordEvent(Landroid/view/MotionEvent;Landroid/app/Activity;)V

    return-void
.end method
